import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import State from './state';
import { Button } from 'antd';
import { save } from '../../https';
@inject('app')
@observer
export default class Page1 extends Component{
    constructor(props) {
        super(props);
        this.localSate = State;
    }

    componentDidMount() {
        console.log(this.props.app);
    }

    render() {
        const {
            num,
            add
        } = this.localSate;
        return <div>
            <span>{num}</span>
            <Button
                onClick={add}
            >+1</Button>
        </div>
    }
}